package com.demo.dubbo.consumer.service.impl;

import com.demo.dubbo.api.service.ConsumerService;
import com.demo.dubbo.api.service.ProviderService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.apache.dubbo.config.annotation.DubboService;

/**
 * @author yt
 * @date 2021/4/25
 */
@DubboService
public class ConsumerServiceImpl implements ConsumerService {

    @DubboReference
    private ProviderService providerService;

    public String consumer() {
        String provider = providerService.providerToConsumer();
        return provider + " TO CONSUMER ";
    }

    public String consumerToProvider() {
        return "THIS IS CONUSMER";
    }

}
